<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout" xmlns:th="http://www.thymeleaf.org"
      layout:decorate="~{admin/layout}">
<body>

<div  class="content-wrap" layout:fragment="content">
    <main id="content" class="content" role="main">
        <ol class="breadcrumb">
            <li>财务管理</li>
            <li class="active">更新管理</li>
        </ol>
        <div class="row mb-lg">
            <div class="tab-content mb-lg" id="myTabContent">
                <div role="tabpanel" class="tab-pane active in clearfix" id="basic" aria-labelledby="basic-tab" aria-expanded="true">
                   <div class="widget-body">
                        <div class="mt">
                            <table class="table table-striped table-hover">
                                <thead>
                                <tr>
                                    <th>地块</th>
                                    <th class="no-sort">更新数量</th>
                                    <th class="no-sort">胸径/地径</th>
                                    <th class="no-sort">高度</th>
                                    <th class="no-sort">冠幅</th>
                                    <th class="no-sort">枝条数</th>
                                    <th class="no-sort">成本</th>
                                    <th class="no-sort">确认</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr th:each="update:${update}">
                                    <td th:text="${update.location}"></td>
                                    <td th:text="${update.quantity}"></td>
                                    <td class="check" th:text="${update.chestBreadth+'-'+update.chestBreadthmax}"></td>
                                    <td class="check"  th:text="${update.height+'-'+update.heightmax}"></td>
                                    <td  class="check" th:text="${update.crownWidth+'-'+update.crownWidthmax}"></td>
                                    <td th:text="${update.salenumber+'-'+update.salenumbermax}" class="check"></td>
                                    <td th:text="${update.cost}" class="check"></td>
                                    <td>
                                        <a class="fa fa-check text-danger" th:id="${update.updateorder_id}" onclick="setid(this.id)" data-toggle="modal" data-target="#myModal18"></a>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script>
            function setid(id) {
                $("#updateorder_id").val(id);
            }
        </script>
        <div class="modal fade" id="myModal18" tabindex="-1" role="dialog" aria-labelledby="myModalLabel18" aria-hidden="true" style="display: none;">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                        <h5 class="modal-title text-xl-center fw-bold mt" id="myModalLabel18">死亡率设定</h5>
                    </div>
                    <div class="modal-body bg-gray-lighter">
                        <form th:action="@{/admin/finance/update/confirm}" enctype="multipart/form-data" id="validation-form" class="form-horizontal form-label-left" method="post">
                            <input type="hidden" name="updateorder_id" id="updateorder_id" >
                            <fieldset>
                                <div class="form-group row">
                                    <label class="control-label col-sm-3" >
                                        成本：
                                    </label>
                                    <div class="col-sm-9">
                                        <input type="text" id="cost" name="cost" class="form-control">
                                    </div>
                                    <div class="col-sm-9">
                                        <button type="submit" id="sub" class="btn btn-danger btn-rounded">提交</button>
                                    </div>
                                </div>
                            </fieldset>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <script>
            checknumber();
        </script>
    </main>
</div>
</body>
</html>